package cn.yzgy.yzgyoa.ucenter.mapper;

import cn.yzgy.yzgyoa.ucenter.entity.SysUserDetail;
import cn.yzgy.yzgyoa.ucenter.entity.UserInfoDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 用户详情表，包含用户具体身份信息 Mapper 接口
 * </p>
 *
 * @author Yqsen
 * @since 2019-08-27
 */
public interface SysUserDetailMapper extends BaseMapper<SysUserDetail> {

    /**
     * 根据用户UID获取用户详细信息
     * @param uid uid
     * @return 用户详细信息
     */
    UserInfoDetail getUserDetailInfoByUid(Long uid);

    /**
     * 获取操作员权限
     * @param uid 操作员id
     * @return 操作员权限
     */
    @Select("select data_perm from sys_user_detail where uid='${uid}'")
    String dataPerm(@Param("uid") Long uid);
}
